package o;

import com.huawei.appgallery.downloadengine.api.SessionDownloadTask;
import com.huawei.appgallery.downloadengine.api.SplitTask;
import com.huawei.appgallery.foundation.card.base.bean.AppInfoBean;
import o.dkb.d;
import o.dqw.c;

class dtz$d implements c {
    private d ˋ;
    private AppInfoBean ˏ;

    public dtz$d(AppInfoBean appInfoBean, d dVar) {
        this.ˏ = appInfoBean;
        this.ˋ = dVar;
    }

    public void ˋ(SessionDownloadTask sessionDownloadTask) {
        if (sessionDownloadTask != null) {
            if (this.ˏ.ˈ() == 0) {
                SplitTask splitTask = new SplitTask();
                splitTask.ˋ(this.ˏ.ͺ());
                splitTask.ˊ(this.ˏ.ˊॱ());
                splitTask.ˊॱ(this.ˏ.ˏॱ());
                long j = 0;
                try {
                    j = Long.parseLong(this.ˏ.ॱˎ());
                } catch (NumberFormatException e) {
                    Logger.e("APP_SYN", dtz.ʻ() + " turn2DownloadTask NumberFormatException size=" + this.ˏ.ॱˎ());
                }
                splitTask.ˋ(j);
                sessionDownloadTask.ˏ(splitTask);
            }
            sessionDownloadTask.ʼ(this.ˏ.ˏॱ());
            sessionDownloadTask.ˊ(this.ˏ.ͺ());
            sessionDownloadTask.ॱॱ(this.ˏ.ʽ());
            sessionDownloadTask.ॱ(this.ˏ.ॱᐝ());
            sessionDownloadTask.ʽ(this.ˏ.ˋॱ());
            sessionDownloadTask.ˏ(this.ˏ.ॱˊ());
            sessionDownloadTask.ॱ(this.ˏ.ॱॱ());
            sessionDownloadTask.ॱˊ(this.ˏ.ˈ());
            int i = 0;
            try {
                i = Integer.parseInt(this.ˏ.ʻ());
            } catch (NumberFormatException e2) {
                Logger.e("APP_SYN", dtz.ʻ() + " turn2DownloadTask version code error " + e2.toString());
            }
            sessionDownloadTask.ʻ(i);
        }
        if (this.ˋ != null) {
            this.ˋ.ˋ(sessionDownloadTask);
        }
    }

    public void ॱ() {
        Logger.e(dtz.ʻ(), "turn2DownloadTask get bunlde info fail.");
        if (this.ˋ != null) {
            this.ˋ.ˋ(null);
        }
    }
}
